<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // for (let index = 0; index < 10; index++) {
        //     // console.log(index)
        //     for (let i = 0; i < 5; i++) {
        //         if (i == 1) {
        //             break
        //         }
        //         console.log(index, '外层')
        //         console.log(i, '内层')
        //     }
        // }
        // let page_size = 100000
        // const page = Math.ceil(256666 / page_size)
        // for (let page_num = 1; page_num <= page; page_num++) {
        //     const start = (page_num - 1) * page_size
        //     const end = page_num * page_size
        //     console.log(`${start} < id <=${end}`)
        // }
        // console.log(new Date().getTime() - new Date('2023-4-14 14:10:00').getTime() > 60000 )
        const stream = [{
            after_amount: 123,
            before_amount: 120
        }, {
            after_amount: 125,
            before_amount: 123
        }, {
            after_amount: 119,
            before_amount: 125
        }, {
            after_amount: 130,
            before_amount: 119
        }]
        const error = stream.some((item, index) => {
            if (!index) {
                pre_item = item.after_amount
                return false
            }
            if (pre_item !== item.before_amount) {
                return true
            }
            pre_item = item.after_amount
            return false
        })
        console.log(error)
    </script>
</head>

<body>

</body>

</html>